#include "random.h"
#include "findhome.h"
#include <time.h>
#include <stdint.h>
#include <unistd.h>

#define BUFSIZE 20
uint64_t buffer [BUFSIZE];

int main (int argc, char **argv, char **env)
{
	uint64_t seed;
	int i;
	char *home;

	(void) argc;
	(void) argv;

	home = findhome (env);
	seed = (uint64_t) time (0);
	initialize_random (home);
	seed_random (seed);

	while (1)
	{
		for (i = 0; i < BUFSIZE; i ++)
		{
			buffer [i] = generate_random ();
		}
		write (1, buffer, sizeof (buffer));
	}

	return 0;
}

